package JavaDesign.report_finish;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * @author zouran
 * createDate：2023/12/22  11:09
 */
public class Teacher extends User {
    public Teacher(String name, String identity, String clazz) {
        super(name, identity, clazz);
    }

    @Override
    void accept(Visitor visitor) {
        super.accept(visitor);
        visitor.visit(this);
    }

    //升学率
    public double entranceRatio() {
        return BigDecimal.valueOf(Math.random() * 100).setScale(2, RoundingMode.HALF_UP).doubleValue();
    }

}
